using System;

namespace LocalBoard.Domain
{
	/// <summary>
	/// Summary description for UserRole.
	/// </summary>
	public class UserRole
	{
		public const string ADMIN_ROLE_NAME = "admin";
		public const string CLUB_MANAGER_ROLE_NAME = "manager";

		private int _id;
		private string _name;

		public int Id
		{
			get{return _id;}
		}
		public string Name
		{
			get{return _name;}
			set{_name = value;}
		}

		public UserRole(int id, string name)
		{
			_id = id;
			_name = name;
		}

		public static bool UserIsAdministrator(Profile user)
		{
			return user.IsInRole(UserRole.ADMIN_ROLE_NAME);
		}
	}
}
